package com.levy.contronller.lamdaTest;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class SwingTest {

    public static void main(String[] args) {
        JFrame jFrame = new JFrame("ttt");
        JButton jButton = new JButton("bu");

//        jButton.addActionListener(new ActionListener() {
//            @Override
//            public void actionPerformed(ActionEvent e) {
//                System.out.println("clikck");
//            }
//        });

        jButton.addActionListener(event -> System.out.println("clikck"));

        jFrame.add(jButton);
        jFrame.pack();
        jFrame.setVisible(true);
        jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        new Thread(() -> System.out.println("123")).start();
    }
}
